import React, { useState } from 'react'
import '../css/yym/StatusInfo.css'
import Base from './components/Base'
import Status from './components/Status'

export default function StatusInfo() {
    const [show, setShow] = useState('基础信息')

    const changeShow = (str) => {
        setShow(str)
    }
    return (
        <div>
            <div className='title'>
                状态信息查看
            </div>

            <div className='card'>

                <div className='selecter'>
                    <div className={show === '基础信息' ? 'active' : 'deactive'} style={{ borderRadius: '5px 0 0 5px' }} onClick={() => { changeShow('基础信息') }}>基础信息</div>
                    <div className={show === '状态信息' ? 'active' : 'deactive'} style={{ borderRadius: '0 5px 5px 0' }} onClick={() => { changeShow('状态信息') }}>状态信息</div>
                </div>

                <div style={{ marginTop: '20px' }}>
                    {show === '基础信息' ? <Base /> : <Status />}
                </div>

            </div>
        </div>
    )
}
